<template>
	<view>
		<view class="u-demo-block">
			<!-- <text class="u-demo-block__title">测试测试</text> -->
			<view>
				<u-grid :border="false" col="3">
					<u-grid-item customStyle="padding-top: 10px; padding-bottom: 10px"
						@click="openPage('buildworkerinfo')">
						<u-icon :customStyle="{paddingTop:20+'rpx'}" name="https://project.gxrunxiang.com/cdn/my.png"
							:size="40"></u-icon>
						<text class="grid-text">本人信息</text>

					</u-grid-item>
					<u-grid-item customStyle="padding-top: 10px; padding-bottom: 10px"
						@click="openPage('buildworkerchangeinfo')">
						<u-icon :customStyle="{paddingTop:20+'rpx'}" name="https://project.gxrunxiang.com/cdn/change.png"
							:size="40"></u-icon>
						<text class="grid-text">修改本人信息</text>
					
					</u-grid-item>
					<u-grid-item customStyle="padding-top: 10px; padding-bottom: 10px"
						@click="openPage('buildworkerslist')">
						<u-icon :customStyle="{paddingTop:10+'rpx'}" name="https://project.gxrunxiang.com/cdn/ConstructionTeam.png"
							:size="45"></u-icon>
						<text class="grid-text">人员列表</text>
					</u-grid-item>
					<!-- <u-grid-item customStyle="padding-top: 10px; padding-bottom: 10px">
						<u-icon :customStyle="{paddingTop:20+'rpx'}"
							name="https://project.gxrunxiang.com/cdn/line.png" @click="openPage(mapurl)"
							:size="40"></u-icon>
						<text class="grid-text">线路采集</text>
					</u-grid-item> -->
				</u-grid>
			</view>
			</view>
		</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		onShow() {
			let user = JSON.parse(uni.getStorageSync("$userinfo"))
			console.log(user);
		},
		methods: {
			submsg() {
				if (!wx.requestSubscribeMessage)
					return
				wx.requestSubscribeMessage({
					tmplIds: ['g4ZLePoinaX5DPKwRPgBCx15-KfF9F6CuqglDaZp06o',
						'87hkQwY_d1P2s9t-2sOcP5kru3uNQuw53bdJosg043o'
					],
					success(res) {
						// console.log(res)
						// uni.navigateTo({
						// 	url: url
						// })
					},
					fail(res) {
						console.log(res)
					},
				})
			},
			getsubmsg() {
				if (!wx.getSetting)
					return
				wx.getSetting({
					withSubscriptions: true,
					success(res) {
						console.log(res.authSetting)
						// res.authSetting = {
						//   "scope.userInfo": true,
						//   "scope.userLocation": true
						// }
						console.log(res.subscriptionsSetting)
						// res.subscriptionsSetting = {
						//   mainSwitch: true, // 订阅消息总开关
						//   itemSettings: {   // 每一项开关
						//     SYS_MSG_TYPE_INTERACTIVE: 'accept', // 小游戏系统订阅消息
						//     SYS_MSG_TYPE_RANK: 'accept'
						//     zun-LzcQyW-edafCVvzPkK4de2Rllr1fFpw2A_x0oXE: 'reject', // 普通一次性订阅消息
						//     ke_OZC_66gZxALLcsuI7ilCJSP2OJ2vWo2ooUPpkWrw: 'ban',
						//   }
						// }
					}
				})
			},

			openPage(url) {
				// this.getsubmsg()
				// this.submsg(url)
				uni.navigateTo({
					url: url
				})
				// uni.$u.route({type: 'redirect', 
				// 	url: e
				// })
			},
		}
	}
</script>
<style lang="scss">
	.grid-text {
		font-size: 14px;
		color: #909399;
		padding: 10rpx 0 20rpx 0rpx;
		/* #ifndef APP-PLUS */
		box-sizing: border-box;
		/* #endif */
	}
</style>
